Skip to content

feat(action-popover): use subtle Action trigger and deprecate positio… - #8137

Draft
tamas-sage wants to merge 4 commits into
masterfrom
feat/action-popover-button-deprecations
Draft

feat(action-popover): use subtle Action trigger and deprecate positio…#8137
tamas-sage wants to merge 4 commits into
masterfrom
feat/action-popover-button-deprecations

Conversation

@tamas-sage

@tamas-sage tamas-sage commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Proposed behaviour

Use a subtle Action button with a three-dots icon, keep it outlined while open, deprecate manual positioning props, and rely on automatic flipping with docs/stories showing text and textless render-prop examples.

Current behaviour

Most of this is implemented (subtle Action button, open-state outline, deprecations, and examples), but the trigger icon is still dropdown in the component/stories instead of three dots.
image

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

@tamas-sage
tamas-sage requested review from a team as code owners August 17, 2026 09:05
@tamas-sage tamas-sage self-assigned this Aug 17, 2026
@tamas-sage
tamas-sage marked this pull request as draft August 17, 2026 09:05
@edleeks87

Copy link
Copy Markdown
Contributor

We should be using the PopoverMenu to replace the existing menu, you may need to do some mapping/aliasing to get it to work, happy to chat about it on slack if needed


// Any printable character: focus the next item whose label starts with that
// character, wrapping to the start of the list when there is no later match
if (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: the length checks could be combined to

if (
        isButtonMenu &&
        ev.key.trim().length === 1 &&
        !ev.ctrlKey &&
        !ev.metaKey &&
        !ev.altKey &&
      )

@edleeks87 edleeks87 Sep 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussing with @Fenwick17 I think we need to implement this slightly differently as the behaviour isn't intended for SplitButton or MultiActionButton but they will now have it etc. I was thinking we could add a typeahead prop that lets you pass the above as a callback via ActionPopover as a form of opt-in

<PopoverMenu
  isButtonMenu
  typeahead={handleAlphaKeyNavigation}
/>

export { default as ActionPopoverMenuButton } from "./action-popover-menu-button/action-popover-menu-button.component";
/** @deprecated Use `renderButton` with your own button component instead. */
export type { ActionPopoverMenuButtonProps } from "./action-popover-menu-button/action-popover-menu-button.component";
export { default as ActionPopoverDivider } from "./action-popover-divider/action-popover-divider.component";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: the component has been deleted from this path


&[aria-expanded="true"] {
${addFocusStyling()}
background-color: var(--colorsActionMajorTransparent);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is it correct we're using the old tokens here?

@@ -5,7 +5,6 @@ import {
ActionPopoverDivider,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: wrong path for the divider (same in test and interaction stories as well)

onSubmenuOpen?: () => void;
onSubmenuClose?: () => void;
/** Fired when the pointer enters the item, used to open submenus on hover */
onMouseEnter?: (event: React.MouseEvent<HTMLLIElement>) => void;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: I think it we're okay to drop this behaviour as it's not typical or part of the button menu pattern

cc @Fenwick17

);

const interactiveElement = href ? (
<a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: we'll need to override the user agent styles here, we might be able to just use Button (next) as it supports being rendered as an anchor element etc

Image

listRef={menu}
listboxAriaLabelledBy={parentID}
id={menuID}
disableBackgroundUI={isInFlatTable}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: do we need this? I'm not sure where the requirement for this has come from

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: We'd need this exported via the original directory (action-popover-divider/action-popover-divider.component) structure or this would technically be a breaking change

<Button
variant="default"
variantType="subtle"
iconType="dropdown"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: it looks like the icon should be ellipsis in the designs

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants